import axiosInstance from '@/utils/request'
import type{IResponse} from '@/types/types'

/**
 * 商品分类
 */
export const RequestClassify = ():Promise<IResponse>=>{
    return axiosInstance({
        method: "get",
        url: "/api/category"
    })
}

/**
 根据分类ID获取分类列表 
 */
export const RequestGoodsByClassifyid = (categoryId :number):Promise<IResponse>=>{
    return axiosInstance({
        method: "get",
        url: "/api/shop/list",
        params:{
            categoryId 
        }
    })
}